package nl.hu.verbrandendephoenix.view;

import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Panel;
import com.google.gwt.user.client.ui.VerticalPanel;

public class LoggedIn {

	private Panel pnlLogout;
	private Label lblUsername;
	private Anchor ancEditProfile, ancMyAucts, ancNewAuct, ancBuyCredits, ancSearchUser, ancTopAuctions, ancTopBiedingen;
	private Button btnLogout;
	
	public LoggedIn() {
		
	}

	public LoggedIn(String usertype) {
		pnlLogout = new VerticalPanel();
		lblUsername = new Label("Welkom: ");
		pnlLogout.add(lblUsername);

		if (usertype.equals("user")) {
			ancEditProfile = new Anchor("Wijzig Gegevens", "#editprofile");
			pnlLogout.add(ancEditProfile);
			ancBuyCredits = new Anchor("Koop credits", "#buyCredits");
			pnlLogout.add(ancBuyCredits);
		}
		else {
			ancEditProfile = new Anchor("Wijzig Gegevens", "#editprofile");
			pnlLogout.add(ancEditProfile);
			ancBuyCredits = new Anchor("Koop credits", "#buyCredits");
			pnlLogout.add(ancBuyCredits);
			ancSearchUser = new Anchor("Beheer gebruikers", "#searchuser");
			pnlLogout.add(ancSearchUser);
			ancTopAuctions = new Anchor("Top veilingen", "#topauctions");
			pnlLogout.add(ancTopAuctions);
			ancTopBiedingen = new Anchor("Top Biedingen", "#statistics");
			pnlLogout.add(ancTopBiedingen);
		}
		btnLogout = new Button("Logout");
		pnlLogout.add(btnLogout);
	}

	public Panel getPanel() {
		return pnlLogout;
	}

	public Button getBtnLogout() {
		return btnLogout;
	}
}
